package system.controller;

import com.jfinal.aop.Duang;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Record;
import core.exception.FormulaAnalysisException;
import system.service.FormulaService;

/**
 * Created by Administrator on 2017/3/13.
 */
public class FormulaController extends Controller{

    FormulaService formulaService = Duang.duang(FormulaService.class);


    public void insert(){


        String report = getPara("report");
        String projectname = getPara("projectname");
        String projecttype = getPara("projecttype");
        String formula = getPara("formula");


        try {
            formulaService.insert(report,projectname,projecttype,formula);
        } catch (FormulaAnalysisException e) {
            System.out.println(e.getMessage());
        }


        renderText("insert formula");
    }


    public void testpage(){

        render("/WEB-INF/page/test/1.html");
    }





}
